package br.com.intelsys.basics.function;

import java.util.Collection;

public class JstlFunction {

	public static boolean contains(Object container, Object wantedElement) {
		if (container instanceof Collection) {
			if (wantedElement instanceof Collection) {
				for (Object wantedObj : (Collection) wantedElement) {
					if (((Collection) container).contains(wantedObj)) {
						return true;
					}
				}
			} else {
				return ((Collection) container).contains(wantedElement);
			}
		}
		return false;
	}
}
